package com.wlyuan.open.scanner.domain.template;

import com.wlyuan.open.scanner.domain.BaseDomain;
import com.wlyuan.open.scanner.domain.quotation.QuotationDown;
import com.wlyuan.open.scanner.domain.quotation.QuotationUp;
import com.wlyuan.open.scanner.utils.enums.quotation.TemplateModeEnum;
import com.wlyuan.open.scanner.utils.enums.quotation.TemplateStatusEnum;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * @author lijing
 * @description
 */
@EqualsAndHashCode(callSuper = true)
@Data
@ToString(callSuper = true)
public class Template extends BaseDomain {

    private Long id;

    @ApiModelProperty("合约编号")
    private String code;
    @ApiModelProperty("合同号")
    private String pactCode;
    @ApiModelProperty("合约名称")
    private String name;
    @ApiModelProperty("合约状态")
    private TemplateStatusEnum status;
    @ApiModelProperty("合约分类 0 一对多 1 多对一 2 多对多")
    private TemplateModeEnum mode;
    @ApiModelProperty("开始时间")
    private LocalDateTime startTime;
    @ApiModelProperty("结束时间")
    private LocalDateTime endTime;
    @ApiModelProperty("备注")
    private String remarks;
    @ApiModelProperty("原因")
    private String reason;
    @ApiModelProperty("最低费用")
    private BigDecimal minimumFee;
    @ApiModelProperty("保险费率")
    private BigDecimal insuranceRate;
    @ApiModelProperty("税率")
    private BigDecimal taxRate;
    @ApiModelProperty("创建人")
    private Long createBy;
    @ApiModelProperty("更新人")
    private Long updateBy;
    @ApiModelProperty("审核人")
    private Long agreeBy;
    @ApiModelProperty("审核时间")
    private LocalDateTime agreeAt;

    private Long customerTenantId;

    @ApiModelProperty(value = "上游")
    private QuotationUp upstream;
    @ApiModelProperty(value = "下游")
    private QuotationDown downstream;

    @ApiModelProperty("合约明细")
    private TemplateSpec rules;
}
